$barHeight: 3rem;
$raduisWidth: 0.651rem;
$transition: .35s ease-in-out;
$themeColor: #9b62f5;
$themeColor2: #5e5eff;
$fontSize: 1.5rem;
$pagePadding: 1.071rem;
$themeGreyColor: #a19f9f;
$boxShadow: 0 0 0.6rem 0.069rem #c9c9c9;
$shakeAnimation: shake 0.5s ease-in-out infinite;
$minHeight: 400px;
$minWidth: 300px;
@mixin bookBar {
  position: absolute;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: $barHeight;
  background-color: rgba(255, 255, 255, .9);
  box-shadow: $boxShadow;
  border-radius: 0.651rem;
  z-index: 999;
  opacity: 0;
  transition: opacity $transition, bottom $transition, top $transition;
}

@mixin bookFontSizeAnimation {
  transition: left $transition, transform $transition, visibility $transition, opacity $transition;
}

@mixin bookFontProgressAnimation {
  transition: opacity $transition, scale $transition, visibility $transition;
}

@mixin clickActiveAnimation {
  scale: 1;
  &:active {
    scale: .85;
    filter: contrast(160%);
  }
  transition: scale .1s ease-in-out;
}

@mixin disabledStyle {
  cursor: not-allowed;
  opacity: 0.5 !important;
  pointer-events: none;
  transition: opacity $transition;
}

@mixin displayOneLine {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@mixin displayMultiline($lines: 2) {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $lines;
}

@mixin remindInfo {
  position: fixed;
  top: 50%;
  left: 50%;
  white-space: nowrap;
  color: $themeColor;
  transform: translateY(-50%) translateX(-50%);
  font-size: 1.5rem;
}

@keyframes shake {
  0% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(2px, -2px);
  }
  60% {
    transform: translate(-2px, -2px);
  }
  80% {
    transform: translate(2px, 2px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@mixin textDisplayInit {
  opacity: 0;
  visibility: hidden;
  @include bookFontProgressAnimation
}

@mixin textDisplayOver {
  opacity: 1;
  visibility: visible;
  @include bookFontProgressAnimation
}

@mixin hideScrollBar {
  &::-webkit-scrollbar {
    display: none;
  }
}

@mixin bookFartherStyle($isBookHeight: 2.8rem,$isBookWidth: 0.571rem) {
  &:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: $isBookWidth;
    height: calc(100% - #{$isBookHeight});
    border-right: 1px solid #b8abab;
    border-left: 1px solid #a2a2a2;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
  }
}

@mixin bookStyle {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  border: 1px solid #ddd;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  border-radius: 5px;
  background: linear-gradient(to bottom, #fff, #eee);
}

